<?php
  include './myinclude/common.inc.php';

  $g_db = new Mysql_Cls($mysqlConfig);


  $page = $_GET['page'] ? $_GET['page'] : 1 ;
  $perpage = 12;
  $start = ($page-1) * $perpage;
  $limit = 'LIMIT '.$start.','.$perpage;

  //获取文章列表
  $sql = " SELECT SQL_CALC_FOUND_ROWS * FROM cj_hotel_article  ORDER BY hola_id DESC ".$limit;
  $g_db->query($sql);
  while($row = $g_db->fetch_array()){
	  $newList[] = $row;
  }

  $sql = " SELECT FOUND_ROWS() as num";
  $g_db->query($sql);  
  $row = $g_db->fetch_array();
  $countNews = $row['num'];

  unset($_GET['page']); 
  $query = http_build_query($_GET);
  $pagestr = multi($countNews, $perpage, $page, '?'.$query);



  include './mytpl/news.php';
?>
